Add basic SstFileManager functionality #791
Open
+80
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my first contribution to rust-rocksdb. Feedback definitely welcome. In particular, I'm currently not calling the destroy method - should I put it in a Drop implementation or something else?
The goal here is primarily to be able to use SstFileManager.get_total_size in lieu of getting the total SST size from the DB object via https://github.com/tikv/tikv/blob/master/components/engine_rocks/src/util.rs#L179 as part of https://github.com/tikv/tikv/blob/2f73366be325f4bb7c0be5cf5d4add91cb98a79f/components/engine_rocks/src/misc.rs#L317 since getting that property holds the main RocksDB mutex for a long time.
With appropriate followup work, this also gets us closer to being able to enable tikv/tikv#9940